<template>
  <div class="dateError">
    <i>!</i>
    <p>起始年不得大于终止年！</p>
  </div>
</template>

<script>
// 组件引用时需调用父组件的方法
// <dateError v-if="dateErrorShow" @dateErrorS="dateErrorS"></dateError>
// dateErrorS: function () {
//   弹框消失
//   this.dateErrorShow = false
//   初始化输入框
//   this.startYear = ''
//   this.overYear = ''
// }

export default {
  data () {
    return {}
  },
  props: [],
  mounted () {
     var initNum = 0
     var T = this
     var interval =  setInterval(function () {
       initNum += 1
       if (initNum === 5) {
         clearInterval(interval)
         initNum = 0
         T.$emit('dateErrorS')
       }
      },1000)
  }
}
</script>

<style>
    @import '../../../static/components/public/dateError.css'
</style>
